<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	  xmlns:igEditors="http://schemas.infragistics.com/xaml"
	  xmlns:igEditorsPrim="http://schemas.infragistics.com/xaml/primitives"
	  xmlns:ig="http://schemas.infragistics.com/xaml"
	  xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives"
	  xmlns:sys="clr-namespace:System;assembly=mscorlib"
	  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	  xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
	  mc:Ignorable="PresentationOptions d">

  <!-- *********************************  TEHEME COLORS  ********************************* -->
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Theme.Colors.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <!-- *********************************  BRUSHES  ********************************* -->
  <SolidColorBrush x:Key="ForegroundBrush" Color="{StaticResource Color_000}"/>
  <SolidColorBrush x:Key="LightForegroundBrush" Color="{StaticResource Color_009}"/>
  <SolidColorBrush x:Key="TransparentBrush" Color="{StaticResource Color_016}"/>
  <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="{StaticResource Color_012}"/>

  <!-- RepeatButton Brushes -->
  <SolidColorBrush x:Key="ScrollPreviousRepeatButtonBackgroundBrush" Color="{StaticResource Color_009}"/>
  <SolidColorBrush x:Key="ScrollNextRepeatButtonBackgroundBrush" Color="{StaticResource Color_009}"/>

  <!-- Calendar Brushes -->
  <SolidColorBrush x:Key="CalendarBackgroundBrush" Color="{StaticResource Color_009}"/>
  <SolidColorBrush x:Key="CalendarBorderBrush" Color="{StaticResource Color_004}"/>
  <SolidColorBrush x:Key="CalendarOtherMonthForegroundBrush" Color="{StaticResource Color_004}"/>
  <SolidColorBrush x:Key="CalendarDayForegroundBrush" Color="{StaticResource Color_002}"/>

  <!-- CalendarDayOfWeek Brushes -->
  <SolidColorBrush x:Key="CalendarDayOfWeekBackgroundBrush" Color="{StaticResource Color_016}"/>
  <SolidColorBrush x:Key="CalendarDayOfWeekForegroundBrush" Color="{StaticResource Color_002}"/>
  <SolidColorBrush x:Key="CalendarDayOfWeekSeparatorBorderBrush" Color="{StaticResource Color_016}"/>
  <SolidColorBrush x:Key="DisabledDayOfWeekBackgroundBrush" Color="{StaticResource Color_014}"/>
  <SolidColorBrush x:Key="DisabledDayOfWeekForegroundBrush" Color="{StaticResource Color_004}"/>

  <!-- CalendarItem Brushes -->
  <SolidColorBrush x:Key="CalendarItemForegroundBrush" Color="{StaticResource Color_002}"/>
  <SolidColorBrush x:Key="CalendarItemGroupTitleBackgroundBrush" Color="{StaticResource Color_024}"/>
  <SolidColorBrush x:Key="CalendarItemMouseOverBackgroundBrush" Color="{StaticResource Color_006}"/>
  <SolidColorBrush x:Key="CalendarItemMouseOverBorderBrush" Color="{StaticResource Color_003}"/>
  <SolidColorBrush x:Key="CalendarItemSelectedFocusedBorderBrush" Color="{StaticResource Color_024}"/>
  <SolidColorBrush x:Key="CalendarItemSelectedBackgroundBrush"  Color="{StaticResource Color_026}"/>
  <SolidColorBrush x:Key="CalendarItemSelectedBorderBrush" Color="{StaticResource Color_024}"/>
  <SolidColorBrush x:Key="CalendarItemSelectedForegroundBrush" Color="{StaticResource Color_009}"/>
  <SolidColorBrush x:Key="DisabledGroupTitleBackgroundBrush" Color="{StaticResource Color_011}"/>
  <SolidColorBrush x:Key="DisabledGroupTitleForegroundBrush" Color="{StaticResource Color_004}"/>

  <!-- CalendarWeekNumber Brushes -->
  <SolidColorBrush x:Key="CalendarWeekNumberBaseBackgroundBrush"  Color="{StaticResource Color_026}"/>
  <SolidColorBrush x:Key="CalendarWeekNumberBaseForegroundBrush" Color="{StaticResource Color_002}"/>
  <SolidColorBrush x:Key="CalendarWeekNumberBaseBorderBrush" Color="{StaticResource Color_024}"/>

  <!-- Today Brushes -->
  <SolidColorBrush x:Key="TodayForegroundBrush" Color="{StaticResource Color_024}"/>
  <SolidColorBrush x:Key="TodayButtonBackgroundBrush" Color="{StaticResource Color_006}"/>
  <SolidColorBrush x:Key="TodayButtonFocusedBorderBrush" Color="{StaticResource Color_024}"/>

  <!-- CalendarItemAreaWeekNumber Brushes -->
  <SolidColorBrush x:Key="CalendarItemAreaWeekNumberBaseBackgroundBrush" Color="{StaticResource Color_016}"/>
  <SolidColorBrush x:Key="CalendarItemAreaWeekNumberBaseBorderBrush" Color="{StaticResource Color_005}"/>

  <!-- ******************************************************** SL-WPF INLINE-CONTROLS SHARED RESOURCES ***********************************************************
    *********************************************************************************************************************************************************************    -->

  <!-- *********************************  ScrollPreviousRepeatButton Style  ********************************* -->
  <Style x:Key="ScrollPreviousRepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="MinWidth" Value="36"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle Fill="{StaticResource TransparentBrush}" Margin="-6,0"/>
            <Path x:Name="Arrow" Opacity="0.6" Height="14" Stretch="Fill" Fill="{StaticResource ScrollPreviousRepeatButtonBackgroundBrush}" Data="F1 M 822.29,14.5148C 825.705,10.8083 831.53,9.26154 836.05,11.8881C 842.837,14.9016 844.424,24.9282 839.17,30.0482C 832.504,36.9682 825.542,43.6215 818.837,50.5014C 838.744,50.7682 858.662,50.4349 878.569,50.6614C 883.478,50.5549 888.517,53.1149 890.372,57.8481C 893.676,64.9549 887.717,73.8615 879.93,73.7415C 859.542,73.8881 839.157,73.6483 818.769,73.8615C 825.65,80.9816 832.93,87.7282 839.662,94.9948C 844.61,100.515 842.277,110.328 835.329,112.955C 830.091,115.541 824.252,112.622 820.744,108.581C 808.744,96.5682 796.769,84.5281 784.705,72.5815C 782.064,69.9016 779.236,66.7415 779.252,62.7548C 778.824,58.6614 781.436,55.1815 784.209,52.5148C 796.944,39.8881 809.556,27.1415 822.29,14.5148 Z " UseLayoutRounding="False" VerticalAlignment="Center" Width="14"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  ScrollNextRepeatButton Style  ********************************* -->
  <Style x:Key="ScrollNextRepeatButtonStyle" TargetType="RepeatButton">
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="MinWidth" Value="36"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle Fill="{StaticResource TransparentBrush}" Margin="-6,0"/>
            <Path x:Name="Arrow" Opacity="0.6" Width="14" Height="14" Stretch="Fill" Fill="{StaticResource ScrollNextRepeatButtonBackgroundBrush}" Data="F1 M 249.077,9.34161C 253.49,6.07501 260.05,6.9549 263.77,10.8749C 276.077,23.0082 288.197,35.3283 300.477,47.4882C 303.597,50.5417 307.237,54.0217 307.103,58.7684C 307.383,62.4749 305.183,65.7551 302.623,68.2083C 289.69,81.075 276.837,94.0082 263.904,106.875C 259.97,111.315 252.517,111.782 248.063,107.902C 243.17,104.008 242.583,95.8083 247.037,91.3817C 253.717,84.2883 260.957,77.7551 267.517,70.555C 247.597,70.2883 227.664,70.5283 207.73,70.435C 204.303,70.595 200.743,69.6083 198.41,66.9682C 193.677,62.5417 194.117,54.155 199.197,50.155C 201.89,47.6883 205.65,47.3016 209.143,47.435C 228.65,47.435 248.17,47.5016 267.677,47.4084C 260.797,40.3416 253.543,33.6349 246.863,26.395C 242.277,21.5817 243.41,12.8616 249.077,9.34161 Z " UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Center"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  TodayButton Style  ********************************* -->
  <Style x:Key="TodayButtonStyle" TargetType="Button">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
    <Setter Property="MinHeight" Value="30"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused"/>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="Bd" Fill="{StaticResource TodayButtonBackgroundBrush}"/>
            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Opacity="0.7"/>
            <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" Stroke="{StaticResource TodayButtonFocusedBorderBrush}" StrokeThickness="1"/>
            <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource DisabledBackgroundBrush}" IsHitTestVisible="false" Opacity="0"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  CalendarItemGroupTitleButton Style  ********************************* -->
  <Style x:Key="CalendarItemGroupTitleButtonStyle" TargetType="Button">
    <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
    <Setter Property="Padding" Value="10,0,10,2"/>
    <Setter Property="MinHeight" Value="30"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle Fill="{StaticResource TransparentBrush}" Margin="-6"/>
            <ContentPresenter x:Name="contentPresenter" d:LayoutOverrides="Width" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Opacity="0.8" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- ******************************************************** SL-WPF SHARED RESOURCES ***********************************************************
    *****************************************************************************************************************************************************    -->

  <!-- *********************************  Value Converters  ********************************* -->
  <igPrim:ValueConverterGroup x:Key="boolToFontBold">
    <!-- if true sets FontWeight to Bold -->
    <igPrim:FixedValueConverter>
      <igPrim:FixedValueConverter.SourceValue>
        <sys:Boolean>True</sys:Boolean>
      </igPrim:FixedValueConverter.SourceValue>
      <igPrim:FixedValueConverter.DestinationValue>
        <FontWeight>Bold</FontWeight>
      </igPrim:FixedValueConverter.DestinationValue>
    </igPrim:FixedValueConverter>
  </igPrim:ValueConverterGroup>

  <!-- Visibility to '52' -->
  <igPrim:ValueConverterGroup x:Key="visibilityTo52Converter">
    <igPrim:FixedValueConverter>
      <igPrim:FixedValueConverter.SourceValue>
        <Visibility>Visible</Visibility>
      </igPrim:FixedValueConverter.SourceValue>
      <igPrim:FixedValueConverter.DestinationValue>
        <sys:Int32>52</sys:Int32>
      </igPrim:FixedValueConverter.DestinationValue>
    </igPrim:FixedValueConverter>

    <igPrim:FixedValueConverter DestinationValue="{x:Null}">
      <igPrim:FixedValueConverter.SourceValue>
        <Visibility>Collapsed</Visibility>
      </igPrim:FixedValueConverter.SourceValue>
    </igPrim:FixedValueConverter>

  </igPrim:ValueConverterGroup>

  <!-- *********************************  CalendarItem Template  ********************************* -->
  <ControlTemplate x:Key="CalendarItemInnerTemplate" TargetType="igEditorsPrim:CalendarItem">
    <Grid>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="FocusStates">
          <VisualState x:Name="Unfocused"/>
          <VisualState x:Name="Focused">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedItem">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="CommonStates">
          <VisualState x:Name="Normal"/>
          <VisualState x:Name="MouseOver">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverItem">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Disabled">
            <Storyboard>
              <Storyboard>
                <DoubleAnimation Duration="0" To="0.40" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock" d:IsOptimized="True"/>
              </Storyboard>
              <DoubleAnimation Duration="0" To="0.40" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OtherMonthDay" d:IsOptimized="True"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="DayStates">
          <VisualState x:Name="Today">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textBlock" Storyboard.TargetProperty="Foreground">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TodayForegroundBrush}"/>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.FontWeight)" Storyboard.TargetName="textBlock">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <FontWeight>Bold</FontWeight>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="RegularDay"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="LeadingOrTrailingStates">
          <VisualState x:Name="IsNotLeadingOrTrailing"/>
          <VisualState x:Name="IsLeadingOrTrailing">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock" d:IsOptimized="True"/>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="OtherMonthDay">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="textBlock">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Collapsed</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="ActiveStates">
          <VisualState x:Name="Inactive"/>
          <VisualState x:Name="Active">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedItem">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
        <VisualStateGroup x:Name="SelectionStates">
          <VisualState x:Name="Selected">
            <Storyboard>
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedItem">
                <DiscreteObjectKeyFrame KeyTime="0">
                  <DiscreteObjectKeyFrame.Value>
                    <Visibility>Visible</Visibility>
                  </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
              </ObjectAnimationUsingKeyFrames>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Unselected"/>
        </VisualStateGroup>
        <VisualStateGroup x:Name="HighlightStates">
          <VisualState x:Name="IsHighlighted"/>
          <VisualState x:Name="IsNotHighlighted"/>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Rectangle Fill="{StaticResource TransparentBrush}" MinWidth="30" MinHeight="30"/>
      <Rectangle x:Name="MouseOverItem" Visibility="Collapsed" Stroke="{StaticResource CalendarItemMouseOverBorderBrush}" StrokeThickness="1" Fill="{StaticResource CalendarItemMouseOverBackgroundBrush}"/>
      <Rectangle x:Name="SelectedItem" Visibility="Collapsed" Stroke="{StaticResource CalendarItemSelectedBorderBrush}" StrokeThickness="1" Fill="{StaticResource CalendarItemSelectedBackgroundBrush}"/>
      <Border x:Name="InnerBorder" igPrim:XamlHelper.SnapsToDevicePixels="True" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
        <Grid Margin="{TemplateBinding Padding}">
          <TextBlock x:Name="textBlock" Text="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" Foreground="{TemplateBinding Foreground}"/>
          <TextBlock x:Name="SelectedItem1" Text="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" Visibility="Collapsed" Foreground="{StaticResource CalendarItemSelectedForegroundBrush}"/>
          <TextBlock x:Name="OtherMonthDay" Text="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" Visibility="Collapsed" Foreground="{StaticResource CalendarOtherMonthForegroundBrush}"/>
        </Grid>
      </Border>
      <Rectangle x:Name="FocusedItem" Visibility="Collapsed" Stroke="{StaticResource CalendarItemSelectedFocusedBorderBrush}" StrokeThickness="1"/>
    </Grid>
  </ControlTemplate>

  <!-- *********************************  CalendarItem Style  ********************************* -->
  <Style x:Key="CalendarItemBaseStyle" TargetType="igEditorsPrim:CalendarItem">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinHeight" Value="30"/>
    <Setter Property="MinWidth" Value="36"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="4,1,4,1"/>
    <Setter Property="Template" Value="{StaticResource CalendarItemInnerTemplate}"/>
    <Setter Property="Foreground" Value="{StaticResource CalendarItemForegroundBrush}"/>
  </Style>

  <Style TargetType="igEditorsPrim:CalendarItem" BasedOn="{StaticResource CalendarItemBaseStyle}">
    <Setter Property="Margin" Value="0,0,.5,.5"/>
  </Style>

  <!-- *********************************  CalendarDay Style  ********************************* -->
  <Style x:Key="CalendarDayBaseStyle" TargetType="igEditorsPrim:CalendarDay" >
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="MinHeight" Value="30"/>
    <Setter Property="MinWidth" Value="36"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="4,1,4,1"/>
    <Setter Property="Foreground" Value="{StaticResource CalendarDayForegroundBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igEditorsPrim:CalendarDay">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="WorkDayStates">
                <VisualState x:Name="WorkDay"/>
                <VisualState x:Name="NonWorkday"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Unfocused"/>
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedItem">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MouseOverItem">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <Storyboard>
                      <DoubleAnimation Duration="0" To="0.40" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock" d:IsOptimized="True"/>
                    </Storyboard>
                    <DoubleAnimation Duration="0" To="0.40" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OtherMonthDay" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="DayStates">
                <VisualState x:Name="Today">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="textBlock" Storyboard.TargetProperty="Foreground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TodayForegroundBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.FontWeight)" Storyboard.TargetName="textBlock">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <FontWeight>Bold</FontWeight>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="RegularDay"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="LeadingOrTrailingStates">
                <VisualState x:Name="IsNotLeadingOrTrailing"/>
                <VisualState x:Name="IsLeadingOrTrailing">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="textBlock" d:IsOptimized="True"/>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="OtherMonthDay">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="textBlock">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ActiveStates">
                <VisualState x:Name="Inactive"/>
                <VisualState x:Name="Active">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FocusedItem">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedItem">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="SelectedUnfocused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SelectedItem">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unselected"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="HighlightStates">
                <VisualState x:Name="IsHighlighted"/>
                <VisualState x:Name="IsNotHighlighted"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle Fill="{StaticResource TransparentBrush}" MinWidth="30" MinHeight="30"/>
            <Rectangle x:Name="MouseOverItem" Visibility="Collapsed" Stroke="{StaticResource CalendarItemMouseOverBorderBrush}" StrokeThickness="1" Fill="{StaticResource CalendarItemMouseOverBackgroundBrush}"/>
            <Rectangle x:Name="SelectedItem" Visibility="Collapsed" Stroke="{StaticResource CalendarItemSelectedBorderBrush}" StrokeThickness="1" Fill="{StaticResource CalendarItemSelectedBackgroundBrush}"/>
            <Border x:Name="InnerBorder" igPrim:XamlHelper.SnapsToDevicePixels="True" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
              <Grid Margin="{TemplateBinding Padding}">
                <TextBlock x:Name="textBlock"
                           FontWeight="{Binding Path=IsHighlighted, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToFontBold}}" Text="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" Foreground="{TemplateBinding Foreground}"/>
                <TextBlock x:Name="SelectedItem1"
                           FontWeight="{Binding Path=IsHighlighted, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToFontBold}}" Text="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" Visibility="Collapsed" Foreground="{StaticResource CalendarItemSelectedForegroundBrush}"/>
                <TextBlock x:Name="OtherMonthDay"
                           FontWeight="{Binding Path=IsHighlighted, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToFontBold}}" Text="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" Visibility="Collapsed" Foreground="{StaticResource CalendarOtherMonthForegroundBrush}"/>
              </Grid>
            </Border>
            <Rectangle x:Name="FocusedItem" Visibility="Collapsed" Stroke="{StaticResource CalendarItemSelectedFocusedBorderBrush}" StrokeThickness="1"/>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igEditorsPrim:CalendarDay" BasedOn="{StaticResource CalendarDayBaseStyle}"/>

  <!-- *********************************  CalendarDayOfWeek Style  ********************************* -->
  <Style x:Key="CalendarDayOfWeekBaseStyle" TargetType="igEditorsPrim:CalendarDayOfWeek">
    <Setter Property="igPrim:XamlHelper.Focusable" Value="False"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="{Binding Path=ComputedBackground, RelativeSource={RelativeSource Self}}" />
    <Setter Property="Foreground" Value="{Binding Path=ComputedForeground, RelativeSource={RelativeSource Self}}" />
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igEditorsPrim:CalendarDayOfWeek">
          <Border HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
            <TextBlock
                Text="{TemplateBinding DisplayText}"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}">
            </TextBlock>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igEditorsPrim:CalendarDayOfWeek" BasedOn="{StaticResource CalendarDayOfWeekBaseStyle}"/>

  <!-- *********************************  CalendarWeekNumber Style  ********************************* -->
  <Style x:Key="CalendarWeekNumberBaseStyle" TargetType="igEditorsPrim:CalendarWeekNumber">
    <Setter Property="igPrim:XamlHelper.Focusable" Value="False"/>
    <Setter Property="Foreground" Value="{StaticResource CalendarWeekNumberBaseForegroundBrush}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="BorderBrush" Value="{x:Null}"/>
    <Setter Property="MinHeight" Value="30"/>
    <Setter Property="MinWidth" Value="30"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1,0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igEditorsPrim:CalendarWeekNumber">
          <Border x:Name="OuterBorder" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="SelectionStates">
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CalendarWeekNumberBaseBackgroundBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CalendarWeekNumberBaseBorderBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="SelectedUnfocused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Background">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CalendarWeekNumberBaseBackgroundBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="BorderBrush">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CalendarWeekNumberBaseBorderBrush}"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unselected" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <TextBlock  Margin="{TemplateBinding Padding}" MinWidth="6" Foreground="{TemplateBinding ComputedForeground}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" Text="{Binding}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igEditorsPrim:CalendarWeekNumber" BasedOn="{StaticResource CalendarWeekNumberBaseStyle}"/>

  <!-- *********************************  CalendarItemGroupTitle Style  ********************************* -->
  <Style x:Key="CalendarItemGroupTitleBaseStyle" TargetType="igPrim:CalendarItemGroupTitle">
    <Setter Property="Foreground" Value="{StaticResource LightForegroundBrush}"/>
    <Setter Property="Padding" Value="10,0,10,2"/>
    <Setter Property="igPrim:XamlHelper.Focusable" Value="False"/>
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="MinHeight" Value="36"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igPrim:CalendarItemGroupTitle">
          <Grid x:Name="ItemGroupContainer" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Background="{StaticResource CalendarItemGroupTitleBackgroundBrush}" Margin="-1,-1,-1,0">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ItemGroupContainer"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Button x:Name="headerContent" Grid.Column="0" Grid.ColumnSpan="3"
                    Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" igPrim:XamlHelper.Focusable="False" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource CalendarItemGroupTitleButtonStyle}" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}">
              <ig:Commanding.Command>
                <igPrim:CalendarCommandSource EventName="Click" CommandType="ZoomOutCalendarMode" ParameterBinding="{Binding Group, RelativeSource={RelativeSource TemplatedParent}}"/>
              </ig:Commanding.Command>
            </Button>
            <RepeatButton Grid.Column="0" x:Name="previousMonth" IsTabStop="False" Foreground="{TemplateBinding ComputedForeground}" igPrim:XamlHelper.Focusable="False" Visibility="{Binding Group.ScrollPreviousButtonVisibility, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ScrollPreviousRepeatButtonStyle}">
              <ig:Commanding.Command>
                <igPrim:CalendarCommandSource EventName="Click" CommandType="ScrollPreviousGroup"/>
              </ig:Commanding.Command>
            </RepeatButton>
            <RepeatButton Grid.Column="2" x:Name="nextMonth" IsTabStop="False" Foreground="{TemplateBinding ComputedForeground}" igPrim:XamlHelper.Focusable="False" Visibility="{Binding Group.ScrollNextButtonVisibility, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ScrollNextRepeatButtonStyle}">
              <ig:Commanding.Command>
                <igPrim:CalendarCommandSource EventName="Click" CommandType="ScrollNextGroup"/>
              </ig:Commanding.Command>
            </RepeatButton>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igPrim:CalendarItemGroupTitle" BasedOn="{StaticResource CalendarItemGroupTitleBaseStyle}"/>

  <!-- *********************************  CalendarItemGroup Style  ********************************* -->
  <Style TargetType="igEditorsPrim:CalendarItemGroup">
    <Setter Property="igPrim:XamlHelper.Focusable" Value="False"/>
    <Setter Property="Background" Value="{StaticResource TransparentBrush}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igEditorsPrim:CalendarItemGroup">
          <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" igPrim:XamlHelper.SnapsToDevicePixels="True" Padding="{TemplateBinding Padding}">
            <Grid igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}">
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <!--Title-->
              <igEditorsPrim:CalendarItemGroupTitle x:Name="groupTitle" Content="{TemplateBinding Title}"/>
              <igEditorsPrim:CalendarItemAreaPanel Grid.Row="1"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- *********************************  CalendarItemArea Style  ********************************* -->
  <Style x:Key="CalendarItemAreaBaseStyle" TargetType="igEditorsPrim:CalendarItemArea">
    <Setter Property="igPrim:XamlHelper.Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igEditorsPrim:CalendarItemArea">
          <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" igPrim:XamlHelper.SnapsToDevicePixels="True" Padding="{TemplateBinding Padding}">
            <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <!--week numbers-->
                <ColumnDefinition Width="*"/>
                <!--Calendar-->
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <!--Days of Week-->
                <RowDefinition/>
                <!--Calendar-->
              </Grid.RowDefinitions>
              <!--Day Of Week Header-->
              <igEditorsPrim:CalendarDayOfWeekPanel x:Name="DayOfWeekPanel" Grid.Column="1" Visibility="{TemplateBinding DayOfWeekHeaderVisibility}" igPrim:XamlHelper.Focusable="False" Background="{StaticResource CalendarDayOfWeekBackgroundBrush}" Height="30" Margin="6,0"/>
              <!--Week Numbers-->
              <Grid Grid.Column="0" Margin="0,6" Grid.Row="1" x:Name="weekNumbers" Visibility="{TemplateBinding WeekNumberVisibility}">
                <Border Grid.RowSpan="2" Background="{StaticResource CalendarItemAreaWeekNumberBaseBackgroundBrush}" BorderBrush="{StaticResource CalendarItemAreaWeekNumberBaseBorderBrush}" BorderThickness="0,0,1,0"/>
                <!--This is there to ensure the column is wide enough-->
                <igEditorsPrim:CalendarWeekNumber DataContext="{Binding Path=(igEditors:CalendarBase.Calendar).WeekNumberVisibility, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource visibilityTo52Converter}}" Opacity="0" IsHitTestVisible="False"/>
                <igEditorsPrim:CalendarWeekNumberPanel x:Name="WeekNumberPanel" FirstRow="{TemplateBinding Property=FirstItemRowOffset}"/>
              </Grid>
              <!--Items of Group - e.g. Days Of Month-->
              <Border Margin="6" x:Name="itemsList" Grid.Column="1" Grid.Row="1" BorderBrush="{StaticResource CalendarDayOfWeekSeparatorBorderBrush}" BorderThickness="{TemplateBinding ComputedItemsBorderThickness}">
                <igPrim:UniformGrid x:Name="ItemPanel" igPrim:XamlHelper.Focusable="False" FirstColumn="{TemplateBinding FirstItemColumnOffset}" FirstRow="{TemplateBinding FirstItemRowOffset}" Rows="{TemplateBinding ItemRows}" Columns="{TemplateBinding ItemColumns}"/>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="igEditorsPrim:CalendarItemArea" BasedOn="{StaticResource CalendarItemAreaBaseStyle}">
    <Setter Property="Margin" Value="0,5,0,0"/>
  </Style>

  <!-- *********************************  XamCalendar Style  ********************************* -->
  <Style TargetType="igEditors:XamCalendar">
    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="igPrim:XamlHelper.Focusable" Value="True"/>
    <Setter Property="FontSize" Value="14.667"/>
    <Setter Property="FontFamily" Value="Segoe UI"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="igEditors:XamCalendar">
          <Border BorderBrush="{StaticResource CalendarBorderBrush}" BorderThickness="1" Background="{StaticResource CalendarBackgroundBrush}" igPrim:XamlHelper.SnapsToDevicePixels="True" Padding="{TemplateBinding Padding}">
            <Grid x:Name="RootPanel" igPrim:XamlHelper.SnapsToDevicePixels="{TemplateBinding igPrim:XamlHelper.SnapsToDevicePixels}">
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <!--Today button-->
              <Button Grid.Row="1" IsTabStop="False" Content="{TemplateBinding TodayButtonCaption}" Style="{StaticResource TodayButtonStyle}" Visibility="{TemplateBinding TodayButtonVisibility}">
                <ig:Commanding.Command>
                  <igEditorsPrim:CalendarCommandSource EventName="Click" CommandType="Today"/>
                </ig:Commanding.Command>
              </Button>
              <!--Months-->
              <igEditorsPrim:CalendarItemGroupPanel HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>